home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1999 July / macformat-079.iso / Shareware Plus / Development / Optimize scripts / Read me please < prev    next >
Encoding:
Text File  |  1999-04-05  |  5.6 KB  |  79 lines  |  [ttro/ttxt]

  1.                            Optimize scripts 2.1.1
  2.  
  3. What is Optimize scripts?
  4. It is a stack which optimizes your HyperCard scripts. It (1) replaces for example card with cd (that's the optimization for size) and (2) it replaces for example "clickLoc()" with "the clickLoc" (that's the optimization for speed). If you want to know more about how Optimize scripts works have a look at the "How does Optimize Scripts work?" section. 
  5.  
  6.  
  7. How do I use Optimize scripts?
  8. Open Optimize scripts, select the objects of the stack which shall be optimized, select whether they shall be optimized for size or for speed or for both. Then click on the Optimize script button. Select your stack in the open file dialog box which will be shown and hit the "Open" button. That's it. If you want to stop the optimization while it's in progress press command + "." (period). Optimize scripts won't stop immediately, but it will stop. It just takes a few seconds. That's a HyperCard limitation. Maybe it will be fixed in HyperCard 3.0.... :-)
  9.  
  10. Important: 
  11. You should check your answer dialog strings, ask dialog strings, all "go card cardName " and similar commands whether they are still correct after the optimization.
  12.  
  13. Tip: 
  14. Make a copy of the stack you want to optimize, copy the original stack on a floppy disk and optimize the copy of your stack. If you later find an error you can try finding it in the original stack. Optimize scripts does not improve the readability of your scripts (hey, you can't have scripts which are easy to read, fast and small. :-[) It can be harder work to find an error in the optimized stack than in the original stack.
  15.  
  16. Note:
  17. • A HyperCard object is first optimized for size and then for speed if both optimizations shall be performed.
  18. • Comments which start with ∞ characters to show HyperCard that there is a comment should not be used with  
  19.    Optimize scripts when you want to optimize for speed because this may lead to problems (my Performa didn't  
  20.    crash but sometimes the script could not be fully optimized).
  21.    This type of comment will not be deleted when you optimize for size.
  22.    For an example of this type of comment have a look at the stack script of the Home stack.
  23.  
  24.  
  25. How does Optimize scripts work?
  26.  
  27. Optimization for Size:
  28. • It replaces all "cards" with "cds", all "characters" with "chars", etc. pp.
  29. • It deletes all of your comments.
  30. • It joins together lines which are connected with line breaks (¬). If there will be more than 254 characters in     
  31.    one line the lines will not be connected.
  32. • It deletes empty lines. Except the one which is between the end and the beginning of two handlers.
  33. • It shortens the name of the variable behind "on xxxxxKey" handlers.
  34. • It replaces "…& quote &…" with "…“…" ; "…& comma &…" with "…,…" ; and so on.
  35. • It replaces all HyperCard functions with their shorter equivalents (e.g.: "the clickLoc" with "clickLoc()"),
  36.    except the "selectedButton", "selectedLine" and "selectedText" functions. 
  37.  
  38. Optimization for speed:
  39. • It replaces all functions with their faster equivalents (e.g.: "clickLoc()" for example with "the clickLoc"). In   
  40.    the previous version of Optimize scripts "the clickLoc" would have been replaced with "clickLoc()". In my  
  41.    tests this was faster, but several people told me that the other way ("clickLoc()" to "the clickLoc") was  
  42.    faster. Most times "the clickLoc" should be faster. This seems to be a HyperCard "error".
  43. • If one of your handlers contains more than 20 "go card.." commands a lock screen command will be placed the  
  44.    beginning of this handler.
  45. • If your stack consists of more than 50 cards all "go card cardName ", "go card cardNumber ", "of card  
  46.    cardName " and "of card cardNumber " statements will be replaced with "go card id cardID " / "of card id  
  47.    cardID ". If your stacks consists of less than 50 cards it will not be optimized this way because it would not 
  48.    make sense.
  49. • Add, subtract, multiply and divide commands are replaced with their mathematival operators. E.g: "add 3 to it"   
  50.    is replaced with "put it + 3 into it"
  51.  
  52.  
  53. What software/hardware requires Optimize scripts?
  54. Optimize Scripts needs HyperCard 2.3 and System 7 and higher.
  55.  
  56.  
  57. !!Attention!!
  58. Optimize scripts is shareware. Please pay me 5 US$. And what do I get therefore? You will receive free updates if you've got access to the Internet (I'm not glad about this, but to send an update to a person, say in the USA, via postal mail would be MUCH to expensive!! :-[). And above all, and that's the most important thing, you show me that there are people who use and like my program. If these people aren't there…  :-( Please see the "How to register" document for more information. If you have got your registration code choose "Register…" from the "OpSc" menu and enter your registration code. It is case sensitive!! And send me a short mail with your registration code and the email adress updates shall be send to please. If you don't do this I will not able to send you updates.
  59.  
  60.  
  61. How to contact me
  62. If you have any comments, questions, bug reports, etc. - send them to me!
  63. Postal mail: Daniel Schmidt
  64.                     Am Zollstock 19
  65.                     35392 Giessen
  66.                     Germany
  67. Email: jupiter@kagi.com
  68.  
  69.  
  70. Putting Optimize scripts on CD-ROMs, etc.
  71. If you want to put Optimize scripts on CDs, give it away to your friends, etc. do it but only the original unregistered version (consisting of the Optimize scripts stack, the three Read mes and the Register application)!
  72.  
  73.  
  74. Why I made this stack
  75. My HD is always too small and this is one possibility to save disk space. And HyperTalk is not such a fast scripting language...
  76.  
  77.  
  78. Disclaimer
  79. I will NOT pay any fees to you if this software damages your hardware or software!!